<!DOCTYPE html>





<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 3.9.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=7.4.0">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-xiyue-32x32.ico?v=7.4.0">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-xiyue-16x16.ico?v=7.4.0">
  <link rel="mask-icon" href="/images/logo.svg?v=7.4.0" color="#222">

<link rel="stylesheet" href="/css/main.css?v=7.4.0">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css?v=4.7.0">
  <link rel="stylesheet" href="/lib/pace/pace-theme-minimal.min.css?v=1.0.2">
  <script src="/lib/pace/pace.min.js?v=1.0.2"></script>


<script id="hexo-configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '7.4.0',
    exturl: false,
    sidebar: {"position":"left","display":"hide","offset":12,"onmobile":false},
    copycode: {"enable":true,"show_result":true,"style":"default"},
    back2top: {"enable":true,"sidebar":true,"scrollpercent":true},
    bookmark: {"enable":false,"color":"#222","save":"auto"},
    fancybox: false,
    mediumzoom: false,
    lazyload: false,
    pangu: false,
    algolia: {
      appID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    },
    localsearch: {"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":true,"preload":true},
    path: 'search.xml',
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    translation: {
      copy_button: '复制',
      copy_success: '复制成功',
      copy_failure: '复制失败'
    },
    sidebarPadding: 40
  };
</script>

  <meta name="description" content="&amp;emsp;&amp;emsp;做作业的时候，碰到了分子还可以分母不忍直视的分式，为了做反z变换，必须将其化为几个可以查表的分式，虽然我可以手算，但是嘛。。。">
<meta name="keywords" content="Mathematic">
<meta property="og:type" content="article">
<meta property="og:title" content="Mathematica使用记录01-分式">
<meta property="og:url" content="http://xiiyue.gitee.io/2019/10/23/20191023_Mathematica使用记录_01_分式/index.html">
<meta property="og:site_name" content="兮xiyue曰">
<meta property="og:description" content="&amp;emsp;&amp;emsp;做作业的时候，碰到了分子还可以分母不忍直视的分式，为了做反z变换，必须将其化为几个可以查表的分式，虽然我可以手算，但是嘛。。。">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="https://s2.ax1x.com/2019/10/30/K59qRx.png">
<meta property="og:image" content="https://s2.ax1x.com/2019/10/30/K5CiWt.png">
<meta property="og:image" content="https://s2.ax1x.com/2019/10/30/K5Ceeg.png">
<meta property="og:image" content="https://s2.ax1x.com/2019/10/30/K5CdYR.png">
<meta property="og:image" content="https://s2.ax1x.com/2019/10/30/K5CBSx.png">
<meta property="og:image" content="https://s2.ax1x.com/2019/10/30/K5CDl6.png">
<meta property="og:updated_time" content="2019-10-30T13:32:23.025Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Mathematica使用记录01-分式">
<meta name="twitter:description" content="&amp;emsp;&amp;emsp;做作业的时候，碰到了分子还可以分母不忍直视的分式，为了做反z变换，必须将其化为几个可以查表的分式，虽然我可以手算，但是嘛。。。">
<meta name="twitter:image" content="https://s2.ax1x.com/2019/10/30/K59qRx.png">
  <link rel="canonical" href="http://xiiyue.gitee.io/2019/10/23/20191023_Mathematica使用记录_01_分式/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome: false,
    isPost: true,
    isPage: false,
    isArchive: false
  };
</script>

  <title>Mathematica使用记录01-分式 | 兮xiyue曰</title>
  








  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .logo,
  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">
  <div class="container use-motion">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-meta">

    <div>
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">兮xiyue曰</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>


<nav class="site-nav">
  
  <ul id="menu" class="menu">
      
      
      
        
        <li class="menu-item menu-item-home">
      
    

    <a href="/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i> <br>首页</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-categories">
      
    

    <a href="/categories/" rel="section"><i class="menu-item-icon fa fa-fw fa-th"></i> <br>分类</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-tags">
      
    

    <a href="/tags/" rel="section"><i class="menu-item-icon fa fa-fw fa-tags"></i> <br>标签</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-archives">
      
    

    <a href="/archives/" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i> <br>归档</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-about">
      
    

    <a href="/about/" rel="section"><i class="menu-item-icon fa fa-fw fa-user"></i> <br>关于</a>

  </li>
      <li class="menu-item menu-item-search">
        <a href="javascript:;" class="popup-trigger">
        
          <i class="menu-item-icon fa fa-search fa-fw"></i> <br>搜索</a>
      </li>
    
  </ul>

    

</nav>
  <div class="site-search">
    <div class="popup search-popup">
    <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocorrect="off" autocapitalize="none"
           placeholder="搜索..." spellcheck="false"
           type="text" id="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result"></div>

</div>
<div class="search-pop-overlay"></div>

  </div>
</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
      <article itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block post">
    <link itemprop="mainEntityOfPage" href="http://xiiyue.gitee.io/2019/10/23/20191023_Mathematica使用记录_01_分式/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="xiyue">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/xiyueavatar.JPG">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="兮xiyue曰">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">Mathematica使用记录01-分式

          
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              
                
              

              <time title="创建时间：2019-10-23 16:02:08" itemprop="dateCreated datePublished" datetime="2019-10-23T16:02:08+08:00">2019-10-23</time>
            </span>
          
            

            
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2019-10-30 21:32:23" itemprop="dateModified" datetime="2019-10-30T21:32:23+08:00">2019-10-30</time>
              </span>
            
          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/研究学习/" itemprop="url" rel="index"><span itemprop="name">研究学习</span></a></span>

                
                
              
            </span>
          

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>&emsp;&emsp;做作业的时候，碰到了分子还可以分母不忍直视的分式，为了做反z变换，必须将其化为几个可以查表的分式，虽然我可以手算，但是嘛。。。</p>
<a id="more"></a>
<h2 id="Apart-我裂开了"><a href="#Apart-我裂开了" class="headerlink" title="Apart-我裂开了"></a>Apart-我裂开了</h2><p>&emsp;&emsp;函数原型：<code>Apart[expr,var]</code><br>&emsp;&emsp;expr就是你要处理的表达式<br>&emsp;&emsp;var是可选的，可以不填，如果你的表达式中有多个变量，如x和y，填x则将y视为常数处理。</p>
<p>&emsp;&emsp;<font color="Blue" size="5">例</font>：  <font size="6">$\frac{1}{x^4-2 x^2+1}$</font> </p>
<p>&emsp;&emsp;在Mathematica中输入</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">Apart[1/(1-2*x^2+x^4)]</span><br></pre></td></tr></table></figure>
<p>&emsp;&emsp;shift 回车，输出结果如下图</p>
<p><img src="https://s2.ax1x.com/2019/10/30/K59qRx.png" alt="K59qRx.png"></p>
<p>&emsp;&emsp;如果想把分开的几个分式合并为一个呢？</p>
<h2 id="Together-通分求和"><a href="#Together-通分求和" class="headerlink" title="Together-通分求和"></a>Together-通分求和</h2><p>&emsp;&emsp;函数原型：<code>Together[expr]</code><br>&emsp;&emsp;expr就是你要处理的表达式<br>&emsp;&emsp;在Mathematica中输入</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">Together[1/(4*(-1+x)^2)-1/(4*(-1+x))+1/(4*(1+x)^2)+1/(4*(1+x))]</span><br></pre></td></tr></table></figure>
<p>&emsp;&emsp;shift 回车，输出结果如下图</p>
<p><img src="https://s2.ax1x.com/2019/10/30/K5CiWt.png" alt="K5CiWt.png"></p>
<p>&emsp;&emsp;可以看到，结果并不是完全展开式。</p>
<p>&emsp;&emsp;所以<font size="4">$\frac{1}{(x-1)^2 (x+1)^2}$</font>跟<font size="4">$\frac{1}{4 (x-1)^2}+\frac{1}{4 (x+1)}+\frac{1}{4 (x+1)^2}-\frac{1}{4 (x-1)}$</font>才是真正的一对？</p>
<p>&emsp;&emsp;如果想得到展开式呢？</p>
<h2 id="Expand-展开"><a href="#Expand-展开" class="headerlink" title="Expand-展开"></a>Expand-展开</h2><p>&emsp;&emsp;函数原型：<code>Expand[expr]</code><br>&emsp;&emsp;expr就是你要处理的表达式<br>&emsp;&emsp;在Mathematica中输入</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">Expand[(4*(-1+x)^2)]</span><br></pre></td></tr></table></figure>
<p>&emsp;&emsp;shift 回车，输出结果如下图</p>
<p><img src="https://s2.ax1x.com/2019/10/30/K5Ceeg.png" alt="K5Ceeg.png"></p>
<p>&emsp;&emsp;但是我想直接处理分式，应该选择Expand的扩展ExpandDenominator函数，即展开分母。如图</p>
<p><img src="https://s2.ax1x.com/2019/10/30/K5CdYR.png" alt="K5CdYR.png"></p>
<p>&emsp;&emsp;回过头处理刚才Together没搞定的多个分式。</p>
<p><img src="https://s2.ax1x.com/2019/10/30/K5CBSx.png" alt="K5CBSx.png"></p>
<p>&emsp;&emsp;第一次输入的是几个分式之和，它竟然是一个一个分开处理的。我只好先Together，再ExpandDenominator。</p>
<h2 id="Factor-因式分解-没有裂开"><a href="#Factor-因式分解-没有裂开" class="headerlink" title="Factor-因式分解(没有裂开)"></a>Factor-因式分解(没有裂开)</h2><p>&emsp;&emsp;函数原型：<code>Factor[expr]</code></p>
<p>&emsp;&emsp;在Mathematica中输入</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">Factor[1/(4*x^2-8*x+4)]</span><br></pre></td></tr></table></figure>
<p>&emsp;&emsp;输出结果如下图</p>
<p><img src="https://s2.ax1x.com/2019/10/30/K5CDl6.png" alt="K5CDl6.png"></p>
<p>&emsp;&emsp;另外，网上查Wolfram语法时发现用谷歌访问助手能“流畅”浏览，总比打不开好！</p>

    </div>

    
    
    
        
      

      <footer class="post-footer">
          
            
          
          <div class="post-tags">
            
              <a href="/tags/Mathematic/" rel="tag"># Mathematic</a>
            
          </div>
        

        

          <div class="post-nav">
            <div class="post-nav-next post-nav-item">
              
            </div>

            <span class="post-nav-divider"></span>

            <div class="post-nav-prev post-nav-item">
              
                <a href="/2019/11/09/20191109_AnsysWorkbench_01_热源扩散/" rel="prev" title="AnsysWorkbench-01-热源扩散">
                  AnsysWorkbench-01-热源扩散 <i class="fa fa-chevron-right"></i>
                </a>
              
            </div>
          </div>
        
      </footer>
    
  </div>
  
  
  
  </article>

  </div>


          </div>
          

        </div>
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">
        
        
        
        
      

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#Apart-我裂开了"><span class="nav-text">Apart-我裂开了</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Together-通分求和"><span class="nav-text">Together-通分求和</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Expand-展开"><span class="nav-text">Expand-展开</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Factor-因式分解-没有裂开"><span class="nav-text">Factor-因式分解(没有裂开)</span></a></li></ol></div>
        
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image"
      src="/images/xiyueavatar.JPG"
      alt="xiyue">
  <p class="site-author-name" itemprop="name">xiyue</p>
  <div class="site-description" itemprop="description"></div>
</div>
  <nav class="site-state motion-element">
      <div class="site-state-item site-state-posts">
        
          <a href="/archives/">
        
          <span class="site-state-item-count">6</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
    
      
      
      <div class="site-state-item site-state-categories">
        
          
            <a href="/categories/">
          
        
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span>
        </a>
      </div>
    
      
      
      <div class="site-state-item site-state-tags">
        
          
            <a href="/tags/">
          
        
        <span class="site-state-item-count">7</span>
        <span class="site-state-item-name">标签</span>
        </a>
      </div>
    
  </nav>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="https://github.com/xiiyue" title="GitHub &rarr; https://github.com/xiiyue" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i>GitHub</a>
      </span>
    
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="mailto:857319672@qq.com" title="E-Mail &rarr; mailto:857319672@qq.com" rel="noopener" target="_blank"><i class="fa fa-fw fa-envelope"></i>E-Mail</a>
      </span>
    
  </div>



      </div>
        <div class="back-to-top motion-element">
          <i class="fa fa-arrow-up"></i>
          <span>0%</span>
        </div>
      

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2019 – <span itemprop="copyrightYear">2020</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">xiyue</span>
</div>

        












        
      </div>
    </footer>
  </div>

  


  <script src="/lib/anime.min.js?v=3.1.0"></script>
  <script src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  <script src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
<script src="/js/utils.js?v=7.4.0"></script><script src="/js/motion.js?v=7.4.0"></script>
<script src="/js/schemes/muse.js?v=7.4.0"></script>

<script src="/js/next-boot.js?v=7.4.0"></script>



  








  <script src="/js/local-search.js?v=7.4.0"></script>








<script>
if (document.querySelectorAll('div.pdf').length) {
  NexT.utils.getScript('//cdn.jsdelivr.net/npm/pdfobject@2/pdfobject.min.js', () => {
    document.querySelectorAll('div.pdf').forEach(element => {
      PDFObject.embed(element.getAttribute('target'), element, {
        pdfOpenParams: {
          navpanes: 0,
          toolbar: 0,
          statusbar: 0,
          pagemode: 'thumbs',
          view: 'FitH'
        },
        PDFJS_URL: '/lib/pdf/web/viewer.html',
        height: element.getAttribute('height') || '500px'
      });
    });
  }, window.PDFObject);
}
</script>


<script>
if (document.querySelectorAll('pre.mermaid').length) {
  NexT.utils.getScript('//cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js', () => {
    mermaid.initialize({
      theme: 'forest',
      logLevel: 3,
      flowchart: { curve: 'linear' },
      gantt: { axisFormat: '%m/%d/%Y' },
      sequence: { actorMargin: 50 }
    });
  }, window.mermaid);
}
</script>




  

  
    
      
<script type="text/x-mathjax-config">

  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$', '$'], ['\\(', '\\)'] ],
      processEscapes: true,
      skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
    },
    TeX: {
      equationNumbers: {
        autoNumber: 'AMS'
      }
    }
  });

  MathJax.Hub.Register.StartupHook('TeX Jax Ready', function() {
    MathJax.InputJax.TeX.prefilterHooks.Add(function(data) {
      if (data.display) {
        var next = data.script.nextSibling;
        while (next && next.nodeName.toLowerCase() === '#text') {
          next = next.nextSibling;
        }
        if (next && next.nodeName.toLowerCase() === 'br') {
          next.parentNode.removeChild(next);
        }
      }
    });
  });

  MathJax.Hub.Queue(function() {
    var all = MathJax.Hub.getAllJax(), i;
    for (i = 0; i < all.length; i += 1) {
      element = document.getElementById(all[i].inputID + '-Frame').parentNode;
      if (element.nodeName.toLowerCase() == 'li') {
        element = element.parentNode;
      }
      element.classList.add('has-jax');
    }
  });
</script>
<script>
  NexT.utils.getScript('//cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML', () => {
    MathJax.Hub.Typeset();
  }, window.MathJax);
</script>

    
  

  

  

</body>
</html>
